package com.mycompany.app.hr.pa.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;

@Entity
@Table(name="employee_subgroup")
public class EmployeeSubgroup {

    @Id
    @Column(name = "employee_subgroup_id")
    private Integer id;
    
    @Column(name="subgroup_name")
    private String subgroupName;

    @ManyToOne
    @JoinColumn(name = "group_id")
    private EmployeeGroup group;

    // ========================================================

    @Override
    public String toString() {

        return ToStringBuilder.reflectionToString(this);
    }

    // ========================================================

    public Integer getId() {

        return id;
    }

    public void setId(Integer id) {

        this.id = id;
    }

    public String getSubgroupName() {

        return subgroupName;
    }

    public void setSubgroupName(String subgroupName) {

        this.subgroupName = subgroupName;
    }

    public EmployeeGroup getGroup() {

        return group;
    }

    public void setGroup(EmployeeGroup group) {

        this.group = group;
    }

}
